/**
 * 聊天业务操作
 */

const chatModel = require('../models/chat');
const chatCode = require('../codes/chat');

const chat = {

	/**
	 * 发送用户私聊信息
	 * @param  {object}
	 * @return {object|null}     查找结果
	 */
	async sendMessage(formData) {
		let result = await chatModel.sendMessage(formData);
		return result;
	},

	/**
	 * 获取用户私聊信息
	 * @param  {object}
	 * @return {object|null}     查找结果
	 */
	async getMessage(formData) {
		let result = await chatModel.getMessage(formData);
		return result;
	},
};

module.exports = chat;